home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d917.lha / AUSH / AUSHEnglish.doc < prev    next >
Text File  |  1993-10-04  |  37KB  |  916 lines

  1.  
  2.  
  3.                   AUSH - User's Manual
  4.  
  5.  
  6.  
  7.  
  8.  
  9. AboutThisDoc
  10.  
  11.       This manual describes release 3.15 of the utility AUSH. This program
  12.   is (c)1992-1993 by Denis GOUNELLE, any commercial usage or  selling  without
  13.   author's written authorization is  strictly  forbidden.  You  can  copy  and
  14.   spread this program under the following conditions:
  15.  
  16.     - all the files are provided
  17.     - the files are not modified in any way
  18.     - you don't charge more than $6 for copy fee
  19.  
  20.       In spite of several tests, no warranty is made  that    there  are  no
  21.   errors in AUSH. YOU USE THIS PROGRAM AT YOUR OWN RISK. In no event will I be
  22.   liable for any damage, direct or indirect, resulting of the use of AUSH.
  23.  
  24. Introduction
  25.  
  26.       AUSH (Amiga Ultimate SHell)  is  a  new  command  line  interpreter,
  27.   designed to replace Commodore's shell. It takes several features  from  some
  28.   UNIX and Amiga shells I used (sh, csh, tcsh  6.00.03,  AShell  1.3  and  Csh
  29.   4.01A) but also adds a lot of  new  possibilities,  while  remaining    almost
  30.   fully compatible with Commodore shell.
  31.  
  32.       Criticisms and suggestions will always be welcomed. Write to:
  33.  
  34.                    M. GOUNELLE Denis
  35.                     Boite 71
  36.                   6, rue des cailloux
  37.                  92110 CLICHY - FRANCE
  38.  
  39.       You can also send a message to  the  following  Internet  address  :
  40.   "gounelle@alphanet.ch". Note that this mailbox is not mine, so  please  send
  41.   only short messages. As I don't have direct access to  the  messages,  don't
  42.   expect an answer before a dozen of days.
  43.  
  44.       Many thanks to Pierre  ARDICHVILI,  Jean-Yves  PROUX,  Jean-Philippe
  45.   RAPP, and Michel SCHINZ for tests and suggestions.
  46.  
  47. Installation
  48.  
  49.       This version of AUSH only works under system release 2.04 or higher.
  50.   Copy the "AUSH" (the shell itself) and "NewAUSH" (command  to  start  a  new
  51.   shell) files to your "C:" directory. Both AUSH and NewAUSH  are  written  in
  52.   "pure" code, and can be made resident.
  53.       AUSH is now localized, so it    can  adapt  itself  to    your  favorite
  54.   language. All you have to do is to copy  the    good  catalog  file  into  the
  55.   directory corresponding to your  language.  For  exemple,  if  your  default
  56.   language   is    french,    copy    the    "français.catalog"    into    the
  57.   "SYS:Locale/Catalogs/Français" directory, under the name "AUSH.catalog."
  58.  
  59.       The german catalog was translated by Stefan SALEWSKI.
  60.  
  61. The NewAUSH command
  62.  
  63.       The NewAUSH command  is  the    command  to  start  a  new  shell  (as
  64.   Commodore's NewCLI and NewShell). It won't work unless you put AUSH  in  the
  65.   command search directories defined by the "Path" command.  To  start  a  new
  66.   shell, enter the following command:
  67.  
  68.        NewAUSH [WINDOW=window specification] [FROM=startup file]
  69.  
  70.          Example: NewAUSH WINDOW=CON:0/11/640/180/AUSH
  71.  
  72.       From WorkBench, you  must  create  a    "Project"  icon,  and  specify
  73.   NewAUSH complete path in the "DEFAULT TOOL" field. You can  also  specify  a
  74.   stack size ("STACK" field), a window specification ("TOOLS TYPE" field,  the
  75.   syntax is "WINDOW=specification") and a alternate startup file ("TOOLS TYPE"
  76.   field, the syntax is "FROM=file").
  77.  
  78. Command line parsing
  79.  
  80.       Each command you enter is parsed by AUSH before it tries to  execute
  81.   it. First, alias substitution is performed on the command name. An alias can
  82.   be defined by another one (CAUTION: there's no test for alias recursion  !).
  83.   You can prevent alias substitution by adding a "\" character before  command
  84.   name (e.g. "\ls df0:").
  85.       All  command    arguments  are    also  scanned,     and   the   following
  86.   substitutions are performed:
  87.  
  88.       ;       start comment (the rest of the line is discarded).
  89.       ^chr      replaced by "CTRL-chr" if "chr" is a  letter,  by  "chr"
  90.           otherwise.
  91.       §n      replaced by the n-th directory in the directory stack.
  92.       $var      replaced by the value of the given variable  (the  local
  93.           variables are scanned first, then the global    variables,
  94.           and last the Commodore environment variables list) or by
  95.           an empty string if this variable is not defined.
  96.           Variable names may be put between brackets:  to  display
  97.           the value of variable "foo"  followed  by  "hello",  you
  98.           must    type   "echo   ${foo}hello"   instead   of   "echo
  99.           $foohello".
  100.           Variable names may be followed by a function name.  This
  101.           function will be  applied  on  variable  value  (if  the
  102.           variable is defined) during substitution.  The  variable
  103.           value is not modified. Function supported are:
  104.  
  105.           lower   convert to lower-case
  106.           upper   convert to upper-case
  107.           first   extract first character
  108.           slead   skip leading tabs or spaces
  109.           len      return len
  110.           base      delete path name
  111.           noext   delete file extension
  112.           expand  expand the pattern
  113.           split   break value into words
  114.               (see "for" command below)
  115.  
  116.           The syntax is "$var:function", e.g.  "$config:lower"  or
  117.           "${config:lower}".
  118.       pattern      replaced by the name of all files matching the  pattern.
  119.           A pattern is a word with at least one  of  the  AmigaDOS
  120.           wildcards. Take care that  some  commands  (list,  copy,
  121.           ...) expect the pattern and  expand  it  themselves,    so
  122.           you'll have to quote it (e.g. "list '#?.o'") in order to
  123.           avoid conflicts.
  124.       {expr}      replaced by the result of the expression (see below  for
  125.           syntax).
  126.       !!      replaced by last command in history.
  127.       !n      replaced by n-th command in history.
  128.       !str       replaced  by  last  command    beginning  with  "str"  in
  129.           history.
  130.       `cmd`       replaced by the first output line of specified  command.
  131.           Leading spaces are deleted, the line is considered as  a
  132.           whole word and is not parsed again.
  133.           Example: "set foo `type config`" copies the  first  line
  134.           of "config" file in a local variable named "foo".
  135.       \chr      escape the meaning of the "chr" character.
  136.       'str'       copies "str" without  parsing  (except  for  the  "\chr"
  137.           form).
  138.       "str"       copies "str" without parsing (except for  "^chr",  "§n",
  139.           "$var", "{expr}" and "\chr" forms, pattern expansion  is
  140.           not disabled).
  141.       >file      specify output redirection. If the file does    not  exist
  142.           it is created, otherwise it is truncated to zero length.
  143.       >>file      specify output redirection. If the file does    not  exist
  144.           it is created, otherwise output is  append  to  existing
  145.           file.
  146.       <file      specify input redirection.
  147.       @pri      run command at priority "pri" (can be specified anywhere
  148.           on the command line).
  149.       &[pri]      run command in background [at priority  "pri"]  (can  be
  150.           specified anywhere on the command line).
  151.  
  152.   AUSH recognize the following constructions:
  153.  
  154.       cmd1|cmd2|...   execute commands with "pipes"  (the  output  of  the
  155.               commands at the left of the "|" character is used as
  156.               input by the commands  to  the  right)  as  long    as
  157.               return code is zero.
  158.       cmd1,cmd2,...   execute commands as long as return code is zero. You
  159.               can also specify pipes, e.g. "cd ram: , list | wc  ,
  160.               delete foo" is a valid command.
  161.  
  162.   Return code of such  commands  is  the  return  code    of  the  last  command
  163.   executed. Only the last command can be ran in background.
  164.  
  165. Variables
  166.  
  167.       With AUSH, you can define local and global  variables  in  order  to
  168.   store any numeric or alphanumeric value. Valid characters for variable names
  169.   are lowercase and uppercase letters, digits and  the    underscore  character.
  170.   Variable names are case sensitive.
  171.       A global variable is "visible" at any execution level. It  can't  be
  172.   destroyed. Notice  that  these  variable  are  not  the  same  as  Commodore
  173.   environment variables. They are not shared between several shells running at
  174.   the same time. A local variable is "visible" only  at  the  execution  level
  175.   where it has been defined. When  comming  back  to  the  previous  execution
  176.   level, all local variables are destroyed.
  177.       Some variables are used to control AUSH  behaviour  (see  below  for
  178.   description).
  179.  
  180. Expressions
  181.  
  182.       AUSH can compute integer expressions in reverse polish notation. You
  183.   can use variables in such expressions, if their value is  numeric.  You  can
  184.   enter hexadecimal values (e.g.: 0x13e). Results are  displayed  in  decimal.
  185.   Operators are:
  186.  
  187.       +      addition
  188.       -      subtraction
  189.       *      multiplication
  190.       /      integer division
  191.       %      remainder of integer division
  192.       <      shift left
  193.       >      shift right
  194.       &      and
  195.       |      or
  196.       sx      store stack top in register x (x = 0 to 9)
  197.       lx      push register x (x = 0 to 9)
  198.       HEX      change output base to hexadecimal
  199.  
  200.   Registers are set to zero when you start AUSH, and are not modified  between
  201.   two expression evaluations. Numbers and operators must be  separated    by  at
  202.   least one space.
  203.  
  204.   Examples:
  205.  
  206.       echo { 34 3 / 4 + } => 15
  207.       echo { 7 3 - }      => 4
  208.       echo { 10 -2 + }    => 8
  209.  
  210.       set cpt 3
  211.       echo { $cpt 2 * }   => 6
  212.       set cpt { $cpt 1 + }
  213.       echo $cpt          => 4
  214.  
  215. Command line editing
  216.  
  217.       Command line editing is enabled by setting the  "lineedit"  variable
  218.   to "1". AUSH takes control of the shell window, and recognizes the following
  219.   keys:
  220.  
  221.       left      previous character.
  222.       right      next character.
  223.       shift-left  previous word.
  224.       shift-right next word.
  225.       shift-up      last command in history beginning with the current line.
  226.       up      previous command in history.
  227.       down      next command in history.
  228.       ^A      beginning of line.
  229.       ^B      previous character.
  230.       ^E      end of line.
  231.       ^F      next character.
  232.       ^K      delete end of line.
  233.       ^L      refresh line.
  234.       ^N      next command in history.
  235.       ^P      previous command in history.
  236.       ^T      first command in history.
  237.       ^W      delete end of word.
  238.       ^X      kill current line.
  239.       ^Z      last command in history.
  240.       RETURN      save command and execute it.
  241.       ESC      save command but don't execute it.
  242.  
  243.       ^V      suppose that previous word is a variable
  244.           name, and replace it by it's value.
  245.           Example: echo version<^V> => echo 1.10
  246.       TAB      filename/varname completion.
  247.           Example:    cd ram:
  248.                   list Cl<TAB>  => list ClipBoards/
  249.                   echo $hi<TAB> => echo $history
  250.           If the prefix you gave matches several names, it is
  251.           extended up to the point of ambiguity and all the
  252.           possibility are displayed.
  253.           To perform filename completion, AUSH adds the content
  254.           of the "filepat" variable to the prefix and expands
  255.           the resulting pattern.
  256.       ^D      displays the list the possibilities for filename/
  257.           varname completion, but does not modify command line.
  258.  
  259.       HELP      opens a file requester. If you select a file, it's
  260.           name will be added to the command line.
  261.  
  262.       f1 to f10   replaced by the content of "f1" to "f10" variables
  263.           (of "F1" to "F10" if shifted).
  264.  
  265.   The TAB and ^D keys may also be used in the middle of a word. The "keys"
  266.   special variable may be used to remap control keys (see below).
  267.  
  268. Other features
  269.  
  270.       AUSH can execute script files (which are text  files  containing
  271.   several commands) just as any other program. In such    files,    the  local
  272.   variable "argc" is set to the number of arguments you  gave.  AUSH  also
  273.   sets some "pseudo" local variables (the "set" command won't  show  them,
  274.   and you can't modify them): the variable "0" is set to the  script  file
  275.   name, "*" to the argument list (each argument separated by a space)  and
  276.   "1", "2",... variables to the arguments  themselves.  On  startup,  AUSH
  277.   tries to execute the "S:.aushrc" script file.
  278.  
  279.       AUSH can  save  your    commands  in  an  history.  The  "history"
  280.   variable tells how many commands are to be kept. The    "history"  command
  281.   displays the history content. The "savehist"  variable  tells  how  many
  282.   commands must be saved when you quit AUSH. This file is read    when  AUSH
  283.   starts, and all commands in the file are stored in the command  history.
  284.   You can define the "histfile" variable to the name of the file to use to
  285.   save/load command history. Default name is "S:.history".
  286.  
  287.       The alias "dircmd" (if defined) is executed each time you  enter
  288.   a directory name as a  command  name    (without  arguments,  redirection,
  289.   pipe, or background specification). So, "alias dircmd cd %1"  gives  you
  290.   an "implicit cd": to change of directory you just have to enter the  new
  291.   directory name. Of course, you can define a  more  complex  alias,  like
  292.   "alias dircmd cd %1 , list QUICK FILES".
  293.  
  294.       AUSH manage a stack of directories  (64  entries).  You  push  a
  295.   directory with "pushd", you pop a directory with "popd",  and  you  list
  296.   the stack content with "dirs" (all these internal commands are described
  297.   below). You can use this stack in your  commands,  with  the    "§n"  form
  298.   (replaced by the n-th directory in the stack).
  299.  
  300.       With the default stack of 4000 bytes, AUSH  can't  execute  more
  301.   than about 15 nested script files and/or loops  (you'll  get  the  error
  302.   "not enough stack space !").
  303.  
  304.       If the name of the output redirection file is "TTY" (i.e. ">TTY"
  305.   or ">>TTY") the output will be redirected to the  shell's  window.  This
  306.   may be useful in a script file, to display a    message  when  all  output
  307.   have been redirected to a file.
  308.  
  309.       By default, pipes are handled via temporary files  in  the  "T:"
  310.   directory (see "truepipes" variable). The "T:" directory  is  also  used
  311.   for command substitution and loop execution.
  312.  
  313.       A command like "cmd &" is the same as "run cmd" under  Commodore
  314.   shell. AUSH will wait for *ALL* background  commands    to  finish  before
  315.   terminating. Use the "jobs" command to list background commands.
  316.  
  317. Internal commands
  318.  
  319.       These commands can't be run in background, but  can  have  their
  320.   input and/or output redirected. They always return 0 (RETURN_OK)  or  20
  321.   (RETURN_FAIL). "set" and "setvar" commands display variables with  their
  322.   attributes ("x" for exportable, "r" for readonly).
  323.  
  324.   alias
  325.       Displays all aliases and their definitions.
  326.  
  327.   alias name
  328.       Displays definition of alias "name".
  329.  
  330.   alias name 'string'
  331.       Define an alias "name" to the given string. In the  string,  the
  332.       "[]" symbol tells AUSH where to copy alias  arguments.  You  may
  333.       also use the "%1", "%2",
  334.  
  335.   cd [dir]
  336.       Without argument displays the name  of  the  current  directory,
  337.       otherwise sets current directory to "dir".
  338.  
  339.   dirs
  340.       Displays the directory stack.
  341.  
  342.   echo [-c] [args...]
  343.       Just displays  all  given  arguments,  followed  by  a  new-line
  344.       character (except if you specify the "-c" option).
  345.   eval
  346.       Enters expression evaluation  mode:  every  line    you  enter  is
  347.       supposed to be a expression, which result is displayed. To  exit
  348.       this mode, enter the character "x" alone on a newline.
  349.  
  350.   exit [code]
  351.       Returns to previous execution level, with the  specified    return
  352.       code (0 if no arguments). In interactive mode, it terminates the
  353.       shell.
  354.  
  355.   export vars...
  356.       Makes the given local variables "exportable",  so  they  can  be
  357.       read, modified or destroyed by any script file started from  the
  358.       current execution level.
  359.  
  360.   for var in val1 val2... valn
  361.   ....
  362.   done
  363.       Performs a loop. The local variable "var" is set to  each  value
  364.       in the list, and for each value the loop is executed. After  the
  365.       "done" command, the "var" variable tells  for  which  value  the
  366.       loop was last executed.
  367.       You can also use the form "for  var  in  val1  ..  val2",  where
  368.       "val1" and "val2"  are  numeric  values.  Both  numbers  may  be
  369.       negatives. If "val2" is lower than "val1",  loop  step  will  be
  370.       negative.
  371.       The "split" function may be  very  useful  here:  if  the  "foo"
  372.       variable value is "this is an example",  the  "for  i  in  $foo"
  373.       command will only make one loop, with the variable  "i"  set  to
  374.       "this is an example". However, with the "for  i  in  $foo:split"
  375.       command, you will have four loops and the variable "i"  will  be
  376.       set to "this", "is", "and" and "example".
  377.  
  378.   for var from file
  379.   ...
  380.   done
  381.       Performs a loop the same way as for the  previous  form,    except
  382.       that the local variable "var" is set to each line of  the  given
  383.       file.
  384.  
  385.   history [str]
  386.       Displays the command history. If the optional "str" argument  is
  387.       specified, only commands beginning by the "str" string  will  be
  388.       displayed.
  389.  
  390.   if [NOT] condition
  391.   ....
  392.   [else
  393.   ....]
  394.   endif
  395.       Conditionnal execution. The condition may be:
  396.  
  397.       -d name     true if "name" if a directory (1)
  398.       -e name     true if "name" exists (1)
  399.       -f name     true if "name" is a file (1)
  400.       -o name name2   true if "name" and "name2" exist
  401.               and "name" is older than "name2" (1)
  402.       -s name     true if "name" is not an empty file (1)
  403.       str = str   true if strings are equal
  404.       str == str  true if strings are equal
  405.               (case-insensitive)
  406.       n1 LT n2    true if n1 is lower than n2
  407.       n1 LE n2    true if n1 is lower than or equal to n2
  408.       n1 EQ n2    true if n1 is equal to n2
  409.       n1 NE n2    true if n1 is not equal to n2
  410.       n1 GT n2    true if n1 is greater than n2
  411.       n1 GE n2    true is n1 is greater than or equal to n2
  412.  
  413.       The word "NOT" may be used to invert the  condition.  Up  to  16
  414.       "if" commands may be nested.
  415.  
  416.       (1) If the letter after the minus sign is an  upper-case  letter
  417.       (e.g.  "-D"),  the  test  will  fail  without  any  AmigaDOS
  418.       requester if volume is not mounted, if there is no  disk  in
  419.       drive, etc...
  420.  
  421.   jobs
  422.       Displays the list of background commands.
  423.  
  424.   loadhist
  425.       Loads command history from history file. May be useful if you've
  426.       just changed the "histfile" variable, and want to  use  the  new
  427.       history file.
  428.  
  429.   popd [nb]
  430.       Without arguments, pops the  last  directory  in    the  directory
  431.       stack and makes it  the  current    directory.  Otherwise,    truncs
  432.       stack size to "nb" entries (i.e. "popd 0" clears the stack).
  433.  
  434.   pushd dir
  435.       Pushes the current directory onto the directory stack  and  sets
  436.       current directory to "dir".
  437.  
  438.   read [-f] var
  439.       Sets local variable "var" to the first  line  read  on  standard
  440.       input. Returns RETURN_FAIL on end of file. If  you  specify  the
  441.       "-f" option, the user won't be allowed to enter an empty string.
  442.  
  443.   readonly vars...
  444.       Makes the specified variables "readonly".  This  works  both  on
  445.       local and global variables.
  446.  
  447.   set
  448.       Displays all local variables and their values.
  449.  
  450.   set name
  451.       Displays value of local variable "name."
  452.  
  453.   set name value
  454.       Sets local variable "name" to "value".
  455.  
  456.   setvar
  457.       Displays all global variables and their values.
  458.  
  459.   setvar name
  460.       Displays value of global variable "name."
  461.  
  462.   setvar name value
  463.       Sets global variable "name" to "value".
  464.  
  465.   shift
  466.       Shifts script file arguments: "1" pseudo-variable is set to "2",
  467.       "2" is set to "3",... The "argc" and "*" variables are  updated.
  468.  
  469.   source file
  470.       Execute a script file. If you specify an output redirection, all
  471.       commands in the file will be redirected.
  472.  
  473.   stop [code]
  474.       Exits a "for...done" loop with the specified return code  (0  if
  475.       no arguments).
  476.  
  477.   time <command>
  478.       Runs the given command and displays the execution time  of  this
  479.       command. Can be used for all commands,  including  internal  and
  480.       background ones.
  481.  
  482.   unalias name...
  483.       Destroys the specified aliases.
  484.  
  485.   unset name...
  486.       Destroys the specified local variables.
  487.  
  488.   window front
  489.   window back
  490.   window move x y
  491.   window size width height
  492.       Put the window in front of all other windows, in back,  move  it
  493.       or resize it.
  494.  
  495.   writehist
  496.       Writes immediatly  command  history  to  history    file.  Can  be
  497.       useful, for example, before running a program that may crash you
  498.       Amiga.
  499.  
  500. Special variables
  501.  
  502.       These variables are used to control AUSH. You should define them
  503.   as global variables (that is what AUSH does when setting them  to  their
  504.   initial values).
  505.  
  506.   cmdnum      command number (_ShellNumber_CmdNumber, guaranted to  be
  507.           different for each command being executed).
  508.   cwd          current directory.
  509.   debug       if set  to  "1",  displays  commands  before  and  after
  510.           parsing (may be useful to debug script files).
  511.   delim       list of word delimiters for "next word", "previous word"
  512.           and "delete end of word" functions of the  command  line
  513.           editor.
  514.           Initial value: " :/".
  515.   filepat      string  added  to  current  word  to  perform  filename
  516.           completion.
  517.           Initial value: "#?".
  518.   fullhist    if set  to  "1",  save  all  commands  in  the  history.
  519.           Otherwise, don't save twice again the same command.
  520.   histfile    name of the file to use to save/load command history. If
  521.           not set, "S:.history" is assumed.
  522.   histmin     minimal length that a command must have in order    to  be
  523.           saved in history.
  524.           Initial value: 3.
  525.   insert      if set to "1", command line edition is  in  insert  mode
  526.           (overstrike mode otherwise).
  527.           Initial value: 1.
  528.   ioerror     last IoErr() code sets by an internal command.
  529.           Initial value: 0.
  530.   keys          allows you to remap control  keys.  Must    be  set  to  a
  531.           string of lowercase characters, each  character  setting
  532.           the control key to use to call one of the  command  line
  533.           editor's functions. The corresponding function is  found
  534.           by to the position of the letter in the string:
  535.  
  536.           position 1      go to beginning of line
  537.           position 2      previous character
  538.           position 3      list completion
  539.           position 4      go to end of line
  540.           position 5      next character
  541.           position 6      kill end of line
  542.           position 7      refresh line
  543.           position 8      next line
  544.           position 9      previous line
  545.           position 10      swap characters
  546.           position 11      go to beginning of history
  547.           position 12      replace variable
  548.           position 13      kill end of word
  549.           position 14      kill line
  550.           position 15      go to end of history
  551.  
  552.           For example, if the fourth letter is "o", you will  have
  553.           to press ^o to go to end of line. When remapping control
  554.           keys, avoid to use ^h, ^i, ^j and ^m keys, because  they
  555.           are handled in a special way.
  556.           Initial value: "abdefklnpstvwxz".
  557.   lineedit    if set to "1", enables AUSH command line editor. Ignored
  558.           if "remote" variable is set to "1".
  559.   noexpand    if set  to  "1",  patterns  in  command  lines  are  not
  560.           expanded.
  561.   path          command search path. Directory names must  be  separated
  562.           by a semi-colon character ";", and the name  "."  stands
  563.           for the current directory. If a file with  the  "s"  bit
  564.           set is found when searching for a command, AUSH tries to
  565.           run the appropriate command:
  566.  
  567.           rx      if the file begins with "/*" (AREXX script)
  568.           source  if the file begins with ";AUSH" (AUSH script)
  569.           execute in all other cases
  570.  
  571.           Example: setvar path 'ram:;.;c:;sys:utilities'
  572.   prompt      defines normal prompt. You  can  include    the  following
  573.           sequences:
  574.  
  575.           %h      current history number
  576.           %#      shell number
  577.           %i      "if...endif" nesting level
  578.           %l      "for...done" nesting level
  579.           %c      current directory ("cwd" variable)
  580.           %b      basename of current directory
  581.           %s      last return code ("status" variable)
  582.           %Vname  valeur of "name" variable
  583.           %T      time (HH:MM:SS)
  584.           %d      day in the month (1-31)
  585.           %D      day in the week (Mon-Sun)
  586.           %m      month (1-12)
  587.           %M      name of the month (Jan-Dec)
  588.           %y      year (1900-1999)
  589.           %C      CSI character (0x9B)
  590.           %N      carriage return
  591.           %f      size of FAST memory free
  592.           %v      size of CHIP memory free
  593.           %a      size of memory free (FAST+CHIP)
  594.           %%      the '%' sign
  595.  
  596.           Initial value: "%C0;33;40m< %# - #c >%C0;31;40m"
  597.   prompt2     defines prompt between "if" and "endif".
  598.           Initial value: "%i> ".
  599.   prompt3     defines prompt between "for" and "done".
  600.           Initial value: "%l) ".
  601.   remote      set to "1" if running over a serial line (AUX:).
  602.   savehist    number of commands to save. If not defined or set  to  a
  603.           value lower than 1, nothing is saved.
  604.   status      last return code.
  605.   titlebar    defines the titlebar of the current window (same  syntax
  606.           as for the prompts). Ignored if "remote" variable is set
  607.           "1".
  608.   trap          command(s) to run when CTRL-C or CTRL-D are hit during a
  609.           script file or a loop execution. I suggest you define it
  610.           as a local variable, so  that  each  script  file  could
  611.           modify it for it's own use. I also suggest that you give
  612.           an "exit"  command  as  last  command  (e.g.  "set  trap
  613.           'delete $tmpfile , exit 20'"), otherwise execution  will
  614.           not be stopped (so to ignore breaks use "set trap ';'").
  615.           If this variable is not defined,    execution  is  stopped
  616.           with a return code of 20.
  617.   truepipes   if set to "1", pipes are handled via "PIPE:" device.
  618.   version     current version of AUSH.
  619.  
  620. UNIX version
  621.  
  622.       AUSH understands  the  "variable=value"  form.  The  "@pri"  and
  623.   "&pri" forms are ignored, because the nice() system call  doesn't  allow
  624.   raising priority. As expected, Cd without  argument  goes  back  to  the
  625.   $HOME directory. The ".aushrc" and ".history" files are searched in  the
  626.   $HOME directory. In prompt definition, the "%f",  "%v",  "%a"  and  "%C"
  627.   specifications are ignored. The "truepipes" variable is  ignored  (pipes
  628.   are handled with temporary files in the "/tmp" directory).
  629.       Child death time is set to the time we detect it's death (should
  630.   be ok because the SIGCHLD signal is trapped).
  631.       Under any regular  UNIX  shell,  the    "set"  command  shows  all
  632.   environment variables. Under AUSH, you get all local variables.  If  you
  633.   want environnement, you must use the "env" command.
  634.       The command line editor uses the value of the TERM  variable    to
  635.   know which terminal you use. As it's impossible  to  get  the  value  of
  636.   shifted function keys, and shifted up-arrow, these keys are handled only
  637.   if the terminal is "amiga". The HELP key is ignored.
  638.  
  639. History
  640.  
  641.   v1.00   28-Feb-92, 29564 bytes
  642.       o First release.
  643.  
  644.   v1.10   28-Mar-92, 31828 bytes
  645.       o When expanding vars,  look    also  in  ARP/Commodore  and  Manx
  646.         lists.
  647.       o "^D" key displays possibilities for file/varname completion  ;
  648.         "^B", "^F", "^N" and "^P" keys do the same as "left", "right",
  649.         "down" and "up" keys.
  650.       o The command line editor erase cursor while executing a command
  651.         (faster display).
  652.       o The  file  request    read  the  current  work  to  set  request
  653.         initial's directory.
  654.       o Reset SIGBREAKF  signals  when  returning  from  command  line
  655.         editing (they are set if you press "^D", "^E" or "^F" keys)
  656.       o "!!", "!n" and "!string" can  be  specified  anywhere  on  the
  657.         command line.
  658.       o Added -D, -E and -F switches to "if" command.
  659.       o Added "for var in val1 .. val2" specification to  "for...done"
  660.         command.
  661.       o Added alias "dircmd".
  662.       o Add a space after an alias definition without argument (if you
  663.         enter "alias ls dir", and then type "ls  ram:",  you  will  no
  664.         longer have a "Please insert  volume  dirram:  in  any  drive"
  665.         requester).
  666.       o Error messages in german if the "language" variable is set  to
  667.         "deutsch".
  668.       o Renamed "setenv" command to "setvar" (no more  conflicts  with
  669.         Commodore's command), added "echo" command.
  670.       o Added special variables "version" and  "path",  the  "ioerror"
  671.         command  is  initialized  to  "0",  the  "insert"  command  is
  672.         initialized to "1", removed "autocd" variable.
  673.  
  674.   v1.11   29-Mar-92, 31832 bytes
  675.       o Bug fixed: The "echo" command can new be output redirected.
  676.  
  677.   v1.12   11-Apr-92, 32244 bytes
  678.       o Load history *after* "S:.aushrc" execution, in order to  allow
  679.         a  change  of  the    value  of  "history"   variable   in   the
  680.         startup-sequence.
  681.       o Added "NE", "LE", and "GE" switches to "if" command.
  682.       o In "for i in val1 .. val2" specification, "val2" may be  lower
  683.         than "val1", and both value may be negative.
  684.       o No more checking of arguments size for internal commands.
  685.       o Added "^V" key to command line editor.
  686.  
  687.   v1.13   18-Apr-92, 32280 bytes
  688.       o When searching a command with the "path" variable, check  that
  689.         the object is a file (and not a directory).
  690.  
  691.   v1.14   26-Apr-92, 32300 bytes
  692.       o Two bugs fixed in  command    substitution:  didn't  remove  the
  693.         final "`", error in arguments length computation.
  694.       o Bug fixed in the parser: didn't escaped "<>,;" special meaning
  695.         when in first position of a quoted string.
  696.       o Better german messages.
  697.  
  698.   v1.15   01-May-92, 32364 bytes
  699.       o Added "histfile" variable.
  700.       o Two bug  fixed  in    arguments  length  computation:  forgetted
  701.         quotes,  and  didn't  add  some  more  space  for   "splitted"
  702.         arguments.
  703.  
  704.   v1.16   11-May-92, 32404 bytes
  705.       o Bug fixed: the "-c" option of "echo" command  *really*  delete
  706.         the final "\n" (doesn't replace it with a space)
  707.  
  708.   v1.20   16-May-92, 32568 bytes
  709.       o Added "loadhist" and "writehist" commands.
  710.       o Added "%Vname" specification to prompt syntax.
  711.       o Parser modified: parse right part of a complex command *after*
  712.         left part execution, so:
  713.         - "cd ram: , delete *" does what expected  ("*"  was  expanded
  714.           before going to "ram:")
  715.         - all commands in a complex command may be aliases    (not  only
  716.           the first one)
  717.         - you can write a loop in one command ("for i in  1  ..  50  ,
  718.           echo $i , done" didn't worked, now even "cd ram: , for i  in
  719.           *.c , echo $i , compress $i , done , echo fini" does !)
  720.  
  721.   v1.21   17-May-92, 32912 bytes
  722.       o Added "time" command.
  723.  
  724.   v1.22   23-May-92, 32944 bytes
  725.       o Bug fixed in loop handling: when writing commands to temporary
  726.         file, didn't ensure there was  a  "\n"  character  after  each
  727.         command.
  728.  
  729.   v1.23   01-Jun-92, 33328 bytes
  730.       o Several bugs fixed in loop handling (when written on a  single
  731.         line): now "for i in 1 .. 5,echo $i,done" and "for i in 1 .. 5
  732.         , list | wc , done" work.
  733.       o If a file with the "s" bit set if found, when searching for  a
  734.         command in the path defined by the "path" variable, a "source"
  735.         command is automatically run on this file.
  736.       o The "^S" key swaps the two previous characters.
  737.       o The "^D" and "<TAB>" keys can now be used without prefix, i.e.
  738.         at the beginning of a line or after a space character.
  739.       o Bug fixed in command line editor: after a "shift-up" key,  the
  740.         "up" and "down" keys didn't give the expected commands.
  741.  
  742.   v1.30   14-Jun-92, 33932 bytes
  743.       o Fixed several errors detected with "Enforcer" and  "Mungwall".
  744.       o Bug fixed in "shift" command: didn't set "argc"  to  the  good
  745.         value.
  746.       o Handles "$*" (list of arguments separated with a space).
  747.       o Added -f option to "read" command.
  748.       o "argc" variable is now read-only.
  749.       o Checks varnames given to  internal    commands  ("pseudo"  local
  750.         variables are not allowed).
  751.       o "&[pri]" and "@pri" can be specified anywhere on  the  command
  752.         line.
  753.  
  754.   v1.40   26-Jun-92, 37764 bytes
  755.       o Now compiled with SAS/C 5.10b (with pragmas and  optimization)
  756.       o Can be made resident ("pure" code)
  757.       o Bug fixed in strxcat() function: didn't save a2 register
  758.       o Several changes for better support of 2.04 system release, so:
  759.           - no more need for "arp.library"
  760.           - can execute ROM resident/internal commands
  761.           - AmigaDOS "Execute" command works
  762.       o Expression evaluator modified:
  763.         - hex (0x13F) values supported
  764.         - added "HEX", "<", ">", "&", and "|", operators
  765.       o Added "-o" switch to "if" command
  766.       o Bug fixed in "if" command: didn't always UnLock() file
  767.  
  768.   v1.41   30-Jun-92, 37864 bytes
  769.       o Bug fixed in command search: doesn't search path for  resident
  770.         commands
  771.  
  772.   v1.42   06-Jul-92, 37872 bytes (Fish #706)
  773.       o Bug fixed in loop handling "for...done":  command  redirection
  774.         was "forgotten"
  775.       o No more "Enforcer" hits  whith  "!string"  (or  "shift-up"  in
  776.         command line editor) when there's  no  command  starting  with
  777.         "string" in history
  778.  
  779.   v1.50   21-Aug-92, 37736 bytes
  780.       o Added global var "keys" (allows to remap control keys)
  781.       o Optional argument "FROM file"
  782.       o More checking at startup time: proc->pr_CLI must  be  a  valid
  783.         pointeur, stop if started from WB, etc...
  784.       o Bug fixed in expression parsing: displayed result  in  decimal
  785.         even if "HEX" was specified
  786.       o Bug fixed under 1.3 system release: didn't give  full  command
  787.         path to function that start command execution
  788.  
  789.   v1.51   01-Sep-92, 37808 bytes
  790.       o Bug fixed in path search: after automatic sourcing of a script
  791.         (bit "s" detected) the following commands were sometimes  also
  792.         considered like a script (and sourced !!!)
  793.       o "history str" displays only commands starting with "str"
  794.       o The "history" command checks CTRL-C while displaying history
  795.       o Displays command founded when using "!!", "!n" or "!str" forms
  796.       o Bug fix: when you did a "cd volume:" the $cwd variable  didn't
  797.         ended with a ':' (so problems for example with a "copy df0:foo
  798.         $cwd")
  799.       o Bug fixed in file name completion:    distinguished  lower  case
  800.         and upper case characters.
  801.  
  802.   v1.52   22-Sep-92, 40000 bytes (Fish #747)
  803.       o Allow the ${varname} form
  804.       o Added   variable   functions    (e.g.    "$var:function"    or
  805.         "${var:function}")
  806.       o Added "==" condition to "if" command
  807.       o Command line length is no longer limitated to  256    characters
  808.         under system 2.0
  809.       o Bug fixed: test "s" protection bit even if full  command  path
  810.         name is given
  811.       o Some bugs fixed in "for...done" loop handling
  812.       o The $cwd variable now always ended with a ":" or a "/"
  813.       o If no file correspond to a pattern, displays an error  message
  814.         and don't execute command
  815.  
  816.   v1.53   22-Sep-92, 40136 bytes
  817.       o May now be used over the serial port (AUX:)
  818.       o Added "remote" variable
  819.       o "cmdnum", "cwd", "status", "version"  and  "remote"  variables
  820.         are now readonly
  821.       o Access to directories stack is  done  with    "§nb"  instead  of
  822.         "=nb" (no more need to protect "=" for the "if" command)
  823.  
  824.   v1.54   05-Oct-92, 40120 bytes
  825.       o No more deadlocks in command line editor
  826.       o Bug fixed: couldn't execute a  command  located  on  a  volume
  827.         which name has spaces in
  828.       o Bug fixed: if an syntax error occured in !!, !n or !str forms,
  829.         still executed the command
  830.  
  831.   v1.55   23-Oct-92, 40764 bytes
  832.       o Added "for var from file" form
  833.       o When starting a  background  command,  stdin  and  stdout  are
  834.         redirected to "NIL:" (if they have not been redirected yet)
  835.       o Uses "PIPE:" to handle pipes if "truepipes" variable is set to
  836.         "1" (under 2.0 system release only)
  837.       o Added "base" and "noext" functions
  838.  
  839.   v2.00   03-Feb-93, 37744 bytes
  840.       o Recompiled with SAS/C 6.2
  841.       o Now works only under system release 2.0 or more
  842.       o Fully localized.
  843.  
  844.   v2.01   07-Mar-93, 37988 bytes
  845.       o Now handle shell window closing gadget
  846.       o Build argument string in a different way  (add  spaces  before
  847.         args, not after)
  848.       o You can get a '%' in prompt or titlebar
  849.  
  850.   v2.03   13-Apr-93, 38060 bytes
  851.       o In filename completion, automatically add a '/' if the name if
  852.         a directory name or a ' ' if it's a filename
  853.  
  854.   v2.04   04-May-93, 38268 bytes
  855.       o Added "split" function
  856.  
  857.   v3.00   14-May-93, 39336 bytes
  858.       o Parser rewritten from scratch ("$foo:split" work as a command,
  859.         etc...)
  860.       o Aliases handling modified:
  861.         - definitions MUST NOT be enclosed between quotes
  862.         - you may use "%1", "%2,... to specify argument positions
  863.       o Command line editor modified:
  864.         - no more problems with commands on several lines
  865.         - filename completion works even in the middle of a word
  866.         - "top of history" and "bottom of history" functions now  work
  867.       o When finding a script (with bit "s"), try to guess  it's  type
  868.         (AREXX/AUSH/other)
  869.  
  870.   v3.10   25-May-93, 45964 bytes
  871.       o Compile and run under UNIX
  872.       o Added "expand" function and "window" command
  873.       o The "time" command work again
  874.       o If an  error  code    doesn't  have  a  message  in  the  locale
  875.         catalogue, call the Fault() function to get it's meaning
  876.       o All locale catalogues modified
  877.       o  Several  bugs  fixed  ("echo"  without  arguments,   filename
  878.         completion with cursor at the end of a word, varname checking,
  879.         etc...)
  880.  
  881.   v3.11   01-Jun-93, 46388 bytes
  882.       o On an Amiga, don't lose typeahead characters anymore
  883.       o "window" without arguments shows  position  and  size  of  the
  884.         window
  885.  
  886.   v3.12   17-Jun-93, 46396 bytes
  887.       o Bug fixed: interpreted ',' and '|' even if at the beginning of
  888.         a string between
  889.       o Bug fixed: an empty line in a script was considered at end    of
  890.         file
  891.  
  892.   v3.13   27-Jun-93, 46472 bytes
  893.       o Some changes to make compilation easier/better under UNIX
  894.       o Under UNIX, the default prompt doesn't contains ANSI sequences
  895.         anymore
  896.       o Added "%b" specification for prompt definition
  897.  
  898.   v3.14   10-Jul-93, 46588 bytes
  899.       o Compiled with SAS/C 6.3
  900.       o Calling the file requester caused an Enforcer "hit"
  901.       o Bug fixed in parser (substitution of '*'  by  '#?'  is  better
  902.         now)
  903.       o The NewAUSH command returns 0 (instead of 1)
  904.  
  905.   v3.15   25-Jul-93, 46608 bytes
  906.       o Maximal number of arguments for a command is now 128  (instead
  907.         of 64)
  908.       o Bug fixed in parser: $i, "foo"  and  'bar'  were  not  handled
  909.         correctly after a redirection symbol ('>' and '<', for exemple
  910.         "foo > $i" didn't worked)
  911.       o Bug fixed: "cd" didn't changed cli_SetName under AmigaDOS
  912.  
  913.  
  914.  
  915.  
  916.